# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from models import NewUser, ArticleType, Author, Article, Comment, Poll, Keep

from django.contrib import admin

# Register your models here.
class NewUserAdmin(admin.ModelAdmin):
    list_display = ['uname', 'upwd', 'uemail']

class AuthorAdmin(admin.ModelAdmin):
    list_display = ['authorname', 'authorinfo']

class ArticleAdmin(admin.ModelAdmin):
    list_display = ['atitle', 'acontent', 'apub_time', 'aupdate_time', 'acomment_num', 'akeep_num', 'apoll_num']

class CommentAdmin(admin.ModelAdmin):
    list_display = ['user_id', 'article_id', 'content', 'date']

class ArticleTypeAdmin(admin.ModelAdmin):
    list_display = ['atname', 'atinfo']


admin.site.register(NewUser, NewUserAdmin)
admin.site.register(Author, AuthorAdmin)
admin.site.register(Article, ArticleAdmin)
admin.site.register(ArticleType, ArticleTypeAdmin)
admin.site.register(Comment, CommentAdmin)
